package server;

import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.util.HashMap;

public class ManageSocket {
    public static HashMap<String, ObjectInputStream> ois = new HashMap<>();
    public static HashMap<String, ObjectOutputStream> oos = new HashMap<>();
    public static HashMap<String, Socket> socketHashMap = new HashMap<>();

    public static ObjectInputStream getOis(String userid) {
        return ois.get(userid);
    }
    public static void setOis(String userid,ObjectInputStream aois) {
        ois.put(userid,aois);
    }

    public static ObjectOutputStream getOos(String userid) {
        return oos.get(userid);
    }
    public static void setOos(String userid,ObjectOutputStream aoos) {
        oos.put(userid,aoos);
    }

    public static Socket getSocketHashMap(String userid) {
        return socketHashMap.get(userid);
    }
    public static void setSocketHashMap(String userid,Socket socket) {
        socketHashMap.put(userid,socket);
    }
}
